import { ListCache } from "element-plus";
import instance from "../../request/request";


type Res<T> = Promise<ItypeAPI<T>>;
interface ItypeAPI<T> {
    data: T,
    msg: string | null
    code: number
}

interface codeData {
    phone: number,
}
export const getPhoneCode = (data: codeData): Res<string> =>
    instance.post("/v1/api-login-send", data);

interface loginData {
    code: number,
    phone: number,
}
export const getLogin = (data: loginData): Res<string> =>
    instance.post("/v1/api-login-register", data);